require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/movieA/cinema" ], {
    "2f44": function(e, n, i) {
        (function(r) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e, o = (e = i("a34a")) && e.__esModule ? e : {
                default: e
            };
            function d(e, t, n, i, a, o, s) {
                try {
                    var c = e[o](s), r = c.value;
                } catch (e) {
                    return n(e), 0;
                }
                c.done ? t(r) : Promise.resolve(r).then(i, a);
            }
            var l = getApp(), t = {
                data: function() {
                    return {
                        module_name: l.globalData.module_name,
                        showAlert_login: !1,
                        userinfo: r.getStorageSync("userinfo"),
                        setting: r.getStorageSync("setting"),
                        wxCode: "",
                        systemtype: "",
                        mainHeight: 900,
                        pageLoading: !0,
                        city: 0,
                        currentIndex: 0,
                        current: 0,
                        movie_id: 0,
                        cinema_id: 0,
                        cinemaMovieList: [],
                        cinemaMovieList_list: [],
                        day: [],
                        day2: [],
                        day_detail: [],
                        date: 0,
                        pageIndex: 1,
                        pageSize: 20,
                        lon: "",
                        lat: "",
                        shows: [],
                        film: [],
                        item: "",
                        moviedate: "",
                        cinemadetail: "",
                        scheduleslist: [],
                        currentdate: ""
                    };
                },
                components: {
                    gracePage: function() {
                        i.e("graceUI/components/gracePage").then(function() {
                            return resolve(i("1021"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceHeader: function() {
                        i.e("graceUI/components/graceHeader").then(function() {
                            return resolve(i("266b"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceNavBar: function() {
                        i.e("graceUI/components/graceNavBar").then(function() {
                            return resolve(i("a631"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceShade: function() {
                        i.e("graceUI/components/graceShade").then(function() {
                            return resolve(i("31ed"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceDialog: function() {
                        i.e("graceUI/components/graceDialog").then(function() {
                            return resolve(i("f85d"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceLoading: function() {
                        i.e("graceUI/components/graceLoading").then(function() {
                            return resolve(i("1d04"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceFlex: function() {
                        i.e("graceUI/components/graceFlex").then(function() {
                            return resolve(i("b5c9"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    graceSearch: function() {
                        i.e("graceUI/components/graceSearch").then(function() {
                            return resolve(i("de21"));
                        }.bind(null, i)).catch(i.oe);
                    }
                },
                props: {},
                onShow: function() {
                    r.hideLoading();
                },
                onReady: function() {},
                onLoad: function(i) {
                    var c, a = this;
                    return c = o.default.mark(function e() {
                        var t, n;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, a.$onLaunched;

                              case 2:
                                (t = a).setting = r.getStorageSync("setting"), t.tabBar = r.getStorageSync("tabbar"), 
                                t.userinfo = r.getStorageSync("userinfo"), r.hideLoading(), a.module_name = l.globalData.module_name, 
                                n = i, t.movie_id = n.movie_id, t.cinema_id = n.cinema_id, n.date && (t.moviedate = n.date), 
                                t.cinemadetail = r.getStorageSync("cinemadetail"), a.loadcinemaMovieList();

                              case 15:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }), function() {
                        var e = this, s = arguments;
                        return new Promise(function(t, n) {
                            var i = c.apply(e, s);
                            function a(e) {
                                d(i, t, n, a, o, "next", e);
                            }
                            function o(e) {
                                d(i, t, n, a, o, "throw", e);
                            }
                            a(void 0);
                        });
                    }();
                },
                methods: {
                    buy: function(e) {
                        console.log(e), r.setStorageSync("showdetail", e.currentTarget.dataset.show), r.setStorageSync("moviedetail", e.currentTarget.dataset.movie), 
                        r.navigateTo({
                            url: "seat?showid=" + e.currentTarget.dataset.showid
                        });
                    },
                    opencinema: function(e) {
                        r.navigateTo({
                            url: "cinema?movie_id=" + e.currentTarget.dataset.movieid + "&cinema_id=" + e.currentTarget.dataset.cinemaid
                        });
                    },
                    navChange: function(e) {
                        this.currentIndex = e, this.shows = [], this.pageIndex = 1, this.moviedate = this.day[e], 
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.currentdate = this.day2[e], null != this.scheduleslist.list[this.movie_id][this.currentdate] ? this.shows = this.scheduleslist.list[this.movie_id][this.currentdate] : this.shows = [], 
                        r.hideLoading();
                    },
                    showDialog2: function() {
                        this.$refs.showAlert_login.open();
                    },
                    closeDialog2: function() {
                        this.$refs.showAlert_login.hide();
                    },
                    scrollend: function() {},
                    openLocation: function() {
                        var e = this;
                        console.log(e.cinemadetail), wx.openLocation({
                            latitude: e.cinemadetail.latitude,
                            longitude: e.cinemadetail.longitude,
                            address: e.cinemadetail.address,
                            name: e.cinemadetail.cinemaName,
                            scale: 18
                        });
                    },
                    loadcinemaMovieList: function() {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var s = this, e = l.globalData.util.url("entry/wxapp/scheduleslist", {
                            m: l.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: s.movie_id,
                                cityid: r.getStorageSync("cityid"),
                                cityCode: r.getStorageSync("cityCode"),
                                type: 1,
                                cinemaId: s.cinema_id
                            },
                            success: function(e) {
                                if (200 == e.data.code) {
                                    for (var t in s.scheduleslist = e.data, s.cinemaMovieList_list = e.data.movies, 
                                    r.setStorageSync("cinemaMovieList", e.data.movies), s.lat = r.getStorageSync("cinemadetail").latitude, 
                                    s.lon = r.getStorageSync("cinemadetail").longitude, e.data.movies) e.data.movies[t].filmId == s.movie_id && (s.film = e.data.movies[t], 
                                    s.current = t);
                                    for (var n = new Array(), i = new Array(), a = 0, o = 0; o < s.scheduleslist.dates2.length; o++) null != s.scheduleslist.list[s.movie_id][s.scheduleslist.dates[o]] && (i.push(s.scheduleslist.dates2[[ o ]]), 
                                    n.push(s.scheduleslist.dates[[ o ]]), s.moviedate == s.scheduleslist.dates2[o] && (a = 1));
                                    for (s.day = i, s.day2 = n, 0 == a && (s.currentdate = n[0], s.currentIndex = 0), 
                                    o = 0; o < n.length; o++) s.moviedate == i[o] && (s.currentdate = n[o], s.currentIndex = o);
                                    null != s.scheduleslist.list[s.movie_id][s.currentdate] ? s.shows = s.scheduleslist.list[s.movie_id][s.currentdate] : s.shows = [], 
                                    r.hideLoading();
                                } else r.hideLoading(), r.showModal({
                                    title: "系统提示",
                                    content: "未获取到影片排期，是否重试？",
                                    showCancel: !0,
                                    success: function(e) {
                                        e.confirm && s.loadcinemaMovieList();
                                    }
                                });
                            }
                        });
                    },
                    swiperChangeHandler: function(e) {
                        e = e.detail.current;
                        this.scrollType = "loading", this.currentTab = 0, this.current = e, this.shows = [];
                        e = this.cinemaMovieList_list[e];
                        this.film = e, r.setStorageSync("moviedetail", e), this.movie_id = this.film.filmId;
                        for (var t = new Array(), n = new Array(), i = 0, a = 0; a < this.scheduleslist.dates2.length; a++) null != this.scheduleslist.list[this.movie_id][this.scheduleslist.dates[a]] && (n.push(this.scheduleslist.dates2[[ a ]]), 
                        t.push(this.scheduleslist.dates[[ a ]]), this.currentdate == this.scheduleslist.dates[a] && (i = 1));
                        for (this.day = n, this.day2 = t, 0 == i && (this.currentdate = t[0], this.currentIndex = 0), 
                        a = 0; a < t.length; a++) this.currentdate == t[a] && (this.currentIndex = a);
                        console.log(this.movie_id), console.log(this.currentdate), null != this.scheduleslist.list[this.movie_id][this.currentdate] ? this.shows = this.scheduleslist.list[this.movie_id][this.currentdate] : this.shows = [], 
                        this.scrollType = "";
                    },
                    userlogin: function() {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type ? this.closeDialog2() : this.showDialog2();
                    },
                    login: function(t) {
                        var n = this;
                        this.closeDialog2(), r.getSetting({
                            success: function(e) {
                                e.authSetting["scope.userInfo"] ? r.getUserInfo({
                                    success: function(e) {
                                        n.userAuth(t, e.userInfo, "login");
                                    }
                                }) : n.userAuth(t, null, "login");
                            }
                        });
                    },
                    getWxCode: function() {
                        var t = this;
                        wx.login({
                            success: function(e) {
                                t.wxCode = e.code;
                            }
                        });
                    },
                    userAuth: function(n, e, i) {
                        var a = this;
                        "getUserInfo:ok" == n.detail.errMsg ? wx.login({
                            success: function(e) {
                                var t = l.globalData.util.url("entry/wxapp/api", {
                                    m: l.globalData.module_name,
                                    o: "userinfo"
                                }), e = {
                                    code: e.code,
                                    encryptedData: n.detail.encryptedData,
                                    iv: n.detail.iv,
                                    openid: r.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status ? (e = l.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                        e = JSON.parse(e), r.setStorageSync("userinfo", e.userinfo), a.userinfo = e.userinfo, 
                                        "login" == i && (a.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })), 1 == a.currentIndex ? a.load_mtscqrcode2() : a.load_mtwmqrcode2()) : r.showToast({
                                            title: "您取消了请求",
                                            icon: "none"
                                        });
                                    }
                                });
                            }
                        }) : r.showToast({
                            title: "获取用户信息失败",
                            icon: "none"
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    }
                }
            };
            n.default = t;
        }).call(this, i("543d").default);
    },
    4199: function(e, t, n) {
        var i = n("9cbd");
        n.n(i).a;
    },
    4266: function(e, t, n) {
        n.d(t, "b", function() {
            return i;
        }), n.d(t, "c", function() {
            return a;
        }), n.d(t, "a", function() {});
        var i = function() {
            this.$createElement;
            this._self._c;
        }, a = [];
    },
    5866: function(e, t, n) {
        n.r(t);
        var i, a = n("2f44"), o = n.n(a);
        for (i in a) "default" !== i && function(e) {
            n.d(t, e, function() {
                return a[e];
            });
        }(i);
        t.default = o.a;
    },
    "5a77": function(e, t, n) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("0cda"), t(n("66fd")), e(t(n("6d1d")).default);
        }).call(this, n("543d").createPage);
    },
    "6d1d": function(e, t, n) {
        n.r(t);
        var i, a = n("4266"), o = n("5866");
        for (i in o) "default" !== i && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(i);
        n("4199");
        var s = n("f0c5"), a = Object(s.a)(o.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        t.default = a.exports;
    },
    "9cbd": function(e, t, n) {}
}, [ [ "5a77", "common/runtime", "common/vendor" ] ] ]);